package myJs.myPkg

import jsext._

import scala.scalajs.js
import scala.language.implicitConversions
import scala.scalajs.js.JSConverters._
import jquery.JQuery


/**
 * Created by yz on 2019/3/14
 */
@js.native
trait BootstrapSliderJQuery extends js.Object {

  def slider(): JQuery = scalajs.js.native

  def slider(options:BootstrapSliderOptions): JQuery = scalajs.js.native

  def slider(method:String): js.Array[Double] = scalajs.js.native

}

object BootstrapSliderOptions extends BootstrapSliderOptionsBuilder(noOpts)

class BootstrapSliderOptionsBuilder(val dict: OptMap) extends JSOptionBuilder[BootstrapSliderOptions, BootstrapSliderOptionsBuilder](new BootstrapSliderOptionsBuilder(_)) {

  def tooltip(v: String) = jsOpt("tooltip", v)

  def value(v: js.Array[Int]) = jsOpt("value", v)

  def min(v: Double) = jsOpt("min", v)

  def max(v: Double) = jsOpt("max", v)

}

trait BootstrapSliderOptions extends js.Object {

}

trait BootstrapSliderJQueryImplicits {
  implicit def implicitBootstrapSliderJQuery(jq: JQuery): BootstrapSliderJQuery = {
    jq.asInstanceOf[BootstrapSliderJQuery]
  }
}
